/*
 * telaJogo.java
 *
 * Created on 16 de Dezembro de 2006, 04:09
 */

package magchess10.ClassesIU;

import java.awt.Dimension;
import java.util.HashMap;
import java.util.Map;

import javax.swing.JLabel;

import magchess10.rn.controle.ControleJogo;
import magchess10.rn.jogada.Jogada;
import magchess10.rn.tabuleiro.Casa;
import magchess10.rn.utils.JogadaUtils;
import magchess10.rn.utils.TabuleiroUtils;

public class TelaJogo extends javax.swing.JFrame {

	private static final long serialVersionUID = 1L;
	private JLabel[][] casasTabuleiroPrincipal;
	private JLabel[][] casasTabuleiroSecundario;
	private JLabel[][] repositoriosJogador;
	private ControleJogo controleJogo;
	private final static int JOGADORPRINCIPAL = 0;
	private final static int ADVERSARIO = 1;
	private final static int DUPLAADVERSARIA = 2;
	private final static int DUPLA = 3;
	private String corBaixo, corCima;
	private Map<String, JLabel[][]> hashTabuleiros;

	private JLabel[] lblRelogios;

	/** Creates new form telaJogo */
	public TelaJogo(ControleJogo controleJogo, String corBaixo) {

		definirCores(corBaixo);
		setControleJogo(controleJogo);
		initComponents();
		associarCasasPrincipal();
		associarCasasSecundario();
		associarRepositoriosJogador();
		associarTempoJogadores();
		definirTempoInicial();
		definirNomesJogadores();
		associarHashTabuleiros();
		montarTabuleiros("Secundario");
		montarTabuleiros("Principal");
		adicionarReiRainha();
		associarTempoJogadores();
		controleJogo.setLabelRelogios(lblRelogios);
		this.lblTextoBP.setEditable(false);
		this.lblTextoBP.setAutoscrolls(true);
		this.lblTextoBP.setMaximumSize(new Dimension(300, 30));

	}

	protected void definirCores(String cor) {
		this.corBaixo = cor;
		this.corCima = (cor == "Branca" ? "Preta" : "Branca");

	}

	public String getCorBaixo() {
		return corBaixo;
	}

	public String getCorCima() {
		return corCima;
	}

	protected ControleJogo getControleJogo() {
		return controleJogo;
	}

	private void associarHashTabuleiros() {
		hashTabuleiros = new HashMap<String, JLabel[][]>();
		hashTabuleiros.put("Principal", casasTabuleiroPrincipal);
		hashTabuleiros.put("Secundario", casasTabuleiroSecundario);
	}

	private boolean verificarTurnoJogadorAlvo(int tipoJogador) {
		return controleJogo.getTurnoJogadorAlvo(tipoJogador);
	}

	protected void setControleJogo(ControleJogo p_controleJogo) {
		controleJogo = p_controleJogo;
	}

	private void associarCasasPrincipal() {
		casasTabuleiroPrincipal = new JLabel[8][8];
		casasTabuleiroPrincipal[0][0] = prinA1;
		casasTabuleiroPrincipal[0][1] = prinB1;
		casasTabuleiroPrincipal[0][2] = prinC1;
		casasTabuleiroPrincipal[0][3] = prinD1;
		casasTabuleiroPrincipal[0][4] = prinE1;
		casasTabuleiroPrincipal[0][5] = prinF1;
		casasTabuleiroPrincipal[0][6] = prinG1;
		casasTabuleiroPrincipal[0][7] = prinH1;
		casasTabuleiroPrincipal[1][0] = prinA2;
		casasTabuleiroPrincipal[1][1] = prinB2;
		casasTabuleiroPrincipal[1][2] = prinC2;
		casasTabuleiroPrincipal[1][3] = prinD2;
		casasTabuleiroPrincipal[1][4] = prinE2;
		casasTabuleiroPrincipal[1][5] = prinF2;
		casasTabuleiroPrincipal[1][6] = prinG2;
		casasTabuleiroPrincipal[1][7] = prinH2;
		casasTabuleiroPrincipal[2][0] = prinA3;
		casasTabuleiroPrincipal[2][1] = prinB3;
		casasTabuleiroPrincipal[2][2] = prinC3;
		casasTabuleiroPrincipal[2][3] = prinD3;
		casasTabuleiroPrincipal[2][4] = prinE3;
		casasTabuleiroPrincipal[2][5] = prinF3;
		casasTabuleiroPrincipal[2][6] = prinG3;
		casasTabuleiroPrincipal[2][7] = prinH3;
		casasTabuleiroPrincipal[3][0] = prinA4;
		casasTabuleiroPrincipal[3][1] = prinB4;
		casasTabuleiroPrincipal[3][2] = prinC4;
		casasTabuleiroPrincipal[3][3] = prinD4;
		casasTabuleiroPrincipal[3][4] = prinE4;
		casasTabuleiroPrincipal[3][5] = prinF4;
		casasTabuleiroPrincipal[3][6] = prinG4;
		casasTabuleiroPrincipal[3][7] = prinH4;
		casasTabuleiroPrincipal[4][0] = prinA5;
		casasTabuleiroPrincipal[4][1] = prinB5;
		casasTabuleiroPrincipal[4][2] = prinC5;
		casasTabuleiroPrincipal[4][3] = prinD5;
		casasTabuleiroPrincipal[4][4] = prinE5;
		casasTabuleiroPrincipal[4][5] = prinF5;
		casasTabuleiroPrincipal[4][6] = prinG5;
		casasTabuleiroPrincipal[4][7] = prinH5;
		casasTabuleiroPrincipal[5][0] = prinA6;
		casasTabuleiroPrincipal[5][1] = prinB6;
		casasTabuleiroPrincipal[5][2] = prinC6;
		casasTabuleiroPrincipal[5][3] = prinD6;
		casasTabuleiroPrincipal[5][4] = prinE6;
		casasTabuleiroPrincipal[5][5] = prinF6;
		casasTabuleiroPrincipal[5][6] = prinG6;
		casasTabuleiroPrincipal[5][7] = prinH6;
		casasTabuleiroPrincipal[6][0] = prinA7;
		casasTabuleiroPrincipal[6][1] = prinB7;
		casasTabuleiroPrincipal[6][2] = prinC7;
		casasTabuleiroPrincipal[6][3] = prinD7;
		casasTabuleiroPrincipal[6][4] = prinE7;
		casasTabuleiroPrincipal[6][5] = prinF7;
		casasTabuleiroPrincipal[6][6] = prinG7;
		casasTabuleiroPrincipal[6][7] = prinH7;
		casasTabuleiroPrincipal[7][0] = prinA8;
		casasTabuleiroPrincipal[7][1] = prinB8;
		casasTabuleiroPrincipal[7][2] = prinC8;
		casasTabuleiroPrincipal[7][3] = prinD8;
		casasTabuleiroPrincipal[7][4] = prinE8;
		casasTabuleiroPrincipal[7][5] = prinF8;
		casasTabuleiroPrincipal[7][6] = prinG8;
		casasTabuleiroPrincipal[7][7] = prinH8;
	}

	private void associarCasasSecundario() {
		casasTabuleiroSecundario = new JLabel[8][8];
		casasTabuleiroSecundario[0][0] = secA1;
		casasTabuleiroSecundario[0][1] = secB1;
		casasTabuleiroSecundario[0][2] = secC1;
		casasTabuleiroSecundario[0][3] = secD1;
		casasTabuleiroSecundario[0][4] = secE1;
		casasTabuleiroSecundario[0][5] = secF1;
		casasTabuleiroSecundario[0][6] = secG1;
		casasTabuleiroSecundario[0][7] = secH1;
		casasTabuleiroSecundario[1][0] = secA2;
		casasTabuleiroSecundario[1][1] = secB2;
		casasTabuleiroSecundario[1][2] = secC2;
		casasTabuleiroSecundario[1][3] = secD2;
		casasTabuleiroSecundario[1][4] = secE2;
		casasTabuleiroSecundario[1][5] = secF2;
		casasTabuleiroSecundario[1][6] = secG2;
		casasTabuleiroSecundario[1][7] = secH2;
		casasTabuleiroSecundario[2][0] = secA3;
		casasTabuleiroSecundario[2][1] = secB3;
		casasTabuleiroSecundario[2][2] = secC3;
		casasTabuleiroSecundario[2][3] = secD3;
		casasTabuleiroSecundario[2][4] = secE3;
		casasTabuleiroSecundario[2][5] = secF3;
		casasTabuleiroSecundario[2][6] = secG3;
		casasTabuleiroSecundario[2][7] = secH3;
		casasTabuleiroSecundario[3][0] = secA4;
		casasTabuleiroSecundario[3][1] = secB4;
		casasTabuleiroSecundario[3][2] = secC4;
		casasTabuleiroSecundario[3][3] = secD4;
		casasTabuleiroSecundario[3][4] = secE4;
		casasTabuleiroSecundario[3][5] = secF4;
		casasTabuleiroSecundario[3][6] = secG4;
		casasTabuleiroSecundario[3][7] = secH4;
		casasTabuleiroSecundario[4][0] = secA5;
		casasTabuleiroSecundario[4][1] = secB5;
		casasTabuleiroSecundario[4][2] = secC5;
		casasTabuleiroSecundario[4][3] = secD5;
		casasTabuleiroSecundario[4][4] = secE5;
		casasTabuleiroSecundario[4][5] = secF5;
		casasTabuleiroSecundario[4][6] = secG5;
		casasTabuleiroSecundario[4][7] = secH5;
		casasTabuleiroSecundario[5][0] = secA6;
		casasTabuleiroSecundario[5][1] = secB6;
		casasTabuleiroSecundario[5][2] = secC6;
		casasTabuleiroSecundario[5][3] = secD6;
		casasTabuleiroSecundario[5][4] = secE6;
		casasTabuleiroSecundario[5][5] = secF6;
		casasTabuleiroSecundario[5][6] = secG6;
		casasTabuleiroSecundario[5][7] = secH6;
		casasTabuleiroSecundario[6][0] = secA7;
		casasTabuleiroSecundario[6][1] = secB7;
		casasTabuleiroSecundario[6][2] = secC7;
		casasTabuleiroSecundario[6][3] = secD7;
		casasTabuleiroSecundario[6][4] = secE7;
		casasTabuleiroSecundario[6][5] = secF7;
		casasTabuleiroSecundario[6][6] = secG7;
		casasTabuleiroSecundario[6][7] = secH7;
		casasTabuleiroSecundario[7][0] = secA8;
		casasTabuleiroSecundario[7][1] = secB8;
		casasTabuleiroSecundario[7][2] = secC8;
		casasTabuleiroSecundario[7][3] = secD8;
		casasTabuleiroSecundario[7][4] = secE8;
		casasTabuleiroSecundario[7][5] = secF8;
		casasTabuleiroSecundario[7][6] = secG8;
		casasTabuleiroSecundario[7][7] = secH8;
	}

	private void associarRepositoriosJogador() {
		repositoriosJogador = new JLabel[4][5];
		repositoriosJogador[0][0] = peaoJogador0;
		repositoriosJogador[0][1] = cavaloJogador0;
		repositoriosJogador[0][2] = bispoJogador0;
		repositoriosJogador[0][3] = torreJogador0;
		repositoriosJogador[0][4] = damaJogador0;

		repositoriosJogador[1][0] = peaoJogador1;
		repositoriosJogador[1][1] = cavaloJogador1;
		repositoriosJogador[1][2] = bispoJogador1;
		repositoriosJogador[1][3] = torreJogador1;
		repositoriosJogador[1][4] = damaJogador1;

		repositoriosJogador[2][0] = peaoJogador2;
		repositoriosJogador[2][1] = cavaloJogador2;
		repositoriosJogador[2][2] = bispoJogador2;
		repositoriosJogador[2][3] = torreJogador2;
		repositoriosJogador[2][4] = damaJogador2;

		repositoriosJogador[3][0] = peaoJogador3;
		repositoriosJogador[3][1] = cavaloJogador3;
		repositoriosJogador[3][2] = bispoJogador3;
		repositoriosJogador[3][3] = torreJogador3;
		repositoriosJogador[3][4] = damaJogador3;

	}

	private void definirNomesJogadores() {
		nomeJogadorPrincipal.setText(controleJogo
				.getNomeJogadorporTipo(JOGADORPRINCIPAL));
		nomeJogadorAdversario.setText(controleJogo
				.getNomeJogadorporTipo(ADVERSARIO));
		nomeJogadorDupla.setText(controleJogo.getNomeJogadorporTipo(DUPLA));
		nomeJogadorDuplaAdversaria.setText(controleJogo
				.getNomeJogadores(DUPLAADVERSARIA));
		nomeJogadorPrincipal2.setText(controleJogo
				.getNomeJogadores(JOGADORPRINCIPAL));
		nomeJogadorAdversario2.setText(controleJogo
				.getNomeJogadores(ADVERSARIO));
		nomeJogadorDupla2.setText(controleJogo.getNomeJogadores(DUPLA));
		nomeJogadorDuplaAdversaria2.setText(controleJogo
				.getNomeJogadores(DUPLAADVERSARIA));
	}

	private void associarTempoJogadores() {
		lblRelogios = new JLabel[4];
		lblRelogios[0] = tempoJogadorPrincipal;
		lblRelogios[1] = tempoJogadorAdversario;
		lblRelogios[2] = tempoJogadorDuplaAdversaria;
		lblRelogios[3] = tempoJogadorDupla;
	}

	private void definirTempoInicial() {
		for (int i = 0; i < 4; i++) {
			float tempoJogadores = controleJogo.getTempoJogadores(i);
			String segundo = tempoJogadores % 60 == 0 ? "0" : "";
			tempoJogadores = tempoJogadores / 60;
			lblRelogios[i].setText(String.valueOf(tempoJogadores) + segundo);
		}
	}

	private void montarTabuleiros(String tipoTabuleiro) {
		adicionarPecas(tipoTabuleiro, "Peao", 0, 1, 1, 6);
		adicionarPecas(tipoTabuleiro, "Cavalo", 1, 5, 0, 7);
		adicionarPecas(tipoTabuleiro, "Bispo", 2, 3, 0, 7);
		adicionarPecas(tipoTabuleiro, "Torre", 0, 7, 0, 7);

	}

	private void adicionarReiRainha() {

		if (corBaixo == "Branca") {
			adicionarPecas("Principal", "Rainha", 3, 8, 0, 7);
			adicionarPecas("Principal", "Rei", 4, 8, 0, 7);
			adicionarPecas("Secundario", "Rainha", 4, 8, 0, 7);
			adicionarPecas("Secundario", "Rei", 3, 8, 0, 7);
		} else {
			adicionarPecas("Principal", "Rainha", 4, 8, 0, 7);
			adicionarPecas("Principal", "Rei", 3, 8, 0, 7);
			adicionarPecas("Secundario", "Rainha", 3, 8, 0, 7);
			adicionarPecas("Secundario", "Rei", 4, 8, 0, 7);
		}
	}

	private void adicionarPecas(String p_tipoTabuleiro, String p_nomePeca,
			int p_colunaInicial, int p_incremento, int p_linhaBaixo,
			int p_linhaCima) {
		JLabel[][] l_tabuleiroAtual = hashTabuleiros.get(p_tipoTabuleiro);
		for (; p_colunaInicial < 8; p_colunaInicial += p_incremento) {
			l_tabuleiroAtual[p_linhaBaixo][p_colunaInicial]
					.setIcon(new javax.swing.ImageIcon(getClass().getResource(
							montaStringPeca(p_linhaBaixo, p_colunaInicial,
									p_tipoTabuleiro, p_nomePeca))));
			l_tabuleiroAtual[p_linhaCima][p_colunaInicial]
					.setIcon(new javax.swing.ImageIcon(getClass().getResource(
							montaStringPeca(p_linhaCima, p_colunaInicial,
									p_tipoTabuleiro, p_nomePeca))));
		}
	}

	private String montaStringPeca(int p_linhaAtual, int p_colunaAtual,
			String p_tipoTabuleiro, String p_tipoPeca) {
		return "/magchess10/ImagensTabuleiro" + p_tipoTabuleiro + "/"
				+ p_tipoPeca + getCorPeca(p_tipoTabuleiro, p_linhaAtual)
				+ TabuleiroUtils.getCorCasa(p_colunaAtual, p_linhaAtual)
				+ ".jpg";
	}

	private String getCorPeca(String p_tipoTabuleiro, int p_linhaAtual) {
		if (p_linhaAtual > 4)
			return (p_tipoTabuleiro == "Secundario" ? corBaixo : corCima);
		return (p_tipoTabuleiro == "Secundario" ? corCima : corBaixo);
	}

	private void initComponents() {
		jPanel2 = new javax.swing.JPanel();
		secA1 = new javax.swing.JLabel();
		secB1 = new javax.swing.JLabel();
		secC1 = new javax.swing.JLabel();
		secD1 = new javax.swing.JLabel();
		secE1 = new javax.swing.JLabel();
		secF1 = new javax.swing.JLabel();
		secG1 = new javax.swing.JLabel();
		secH1 = new javax.swing.JLabel();
		secG2 = new javax.swing.JLabel();
		secF2 = new javax.swing.JLabel();
		secE2 = new javax.swing.JLabel();
		secD2 = new javax.swing.JLabel();
		secC2 = new javax.swing.JLabel();
		secB2 = new javax.swing.JLabel();
		secA2 = new javax.swing.JLabel();
		secH2 = new javax.swing.JLabel();
		secA3 = new javax.swing.JLabel();
		secA4 = new javax.swing.JLabel();
		secB4 = new javax.swing.JLabel();
		secB3 = new javax.swing.JLabel();
		secC3 = new javax.swing.JLabel();
		secC4 = new javax.swing.JLabel();
		secD4 = new javax.swing.JLabel();
		secD3 = new javax.swing.JLabel();
		secE4 = new javax.swing.JLabel();
		secE3 = new javax.swing.JLabel();
		secF4 = new javax.swing.JLabel();
		secF3 = new javax.swing.JLabel();
		secG4 = new javax.swing.JLabel();
		secG3 = new javax.swing.JLabel();
		secH3 = new javax.swing.JLabel();
		secH4 = new javax.swing.JLabel();
		secA5 = new javax.swing.JLabel();
		secA6 = new javax.swing.JLabel();
		secB6 = new javax.swing.JLabel();
		secB5 = new javax.swing.JLabel();
		secC5 = new javax.swing.JLabel();
		secC6 = new javax.swing.JLabel();
		secD6 = new javax.swing.JLabel();
		secD5 = new javax.swing.JLabel();
		secE6 = new javax.swing.JLabel();
		secE5 = new javax.swing.JLabel();
		secF6 = new javax.swing.JLabel();
		secF5 = new javax.swing.JLabel();
		secG6 = new javax.swing.JLabel();
		secG5 = new javax.swing.JLabel();
		secH5 = new javax.swing.JLabel();
		secH6 = new javax.swing.JLabel();
		secA7 = new javax.swing.JLabel();
		secA8 = new javax.swing.JLabel();
		secB8 = new javax.swing.JLabel();
		secB7 = new javax.swing.JLabel();
		secC7 = new javax.swing.JLabel();
		secC8 = new javax.swing.JLabel();
		secD8 = new javax.swing.JLabel();
		secD7 = new javax.swing.JLabel();
		secE8 = new javax.swing.JLabel();
		secE7 = new javax.swing.JLabel();
		secF8 = new javax.swing.JLabel();
		secF7 = new javax.swing.JLabel();
		secG8 = new javax.swing.JLabel();
		secG7 = new javax.swing.JLabel();
		secH7 = new javax.swing.JLabel();
		secH8 = new javax.swing.JLabel();
		jLabel145 = new javax.swing.JLabel();
		jLabel146 = new javax.swing.JLabel();
		jLabel147 = new javax.swing.JLabel();
		jLabel148 = new javax.swing.JLabel();
		jLabel149 = new javax.swing.JLabel();
		jLabel150 = new javax.swing.JLabel();
		jLabel151 = new javax.swing.JLabel();
		jLabel152 = new javax.swing.JLabel();
		jLabel169 = new javax.swing.JLabel();
		jLabel170 = new javax.swing.JLabel();
		jLabel171 = new javax.swing.JLabel();
		jLabel172 = new javax.swing.JLabel();
		jLabel173 = new javax.swing.JLabel();
		jLabel174 = new javax.swing.JLabel();
		jLabel175 = new javax.swing.JLabel();
		jLabel176 = new javax.swing.JLabel();
		jLabel155 = new javax.swing.JLabel();
		nomeJogadorDupla2 = new javax.swing.JLabel();
		nomeJogadorDuplaAdversaria2 = new javax.swing.JLabel();
		jPanel4 = new javax.swing.JPanel();
		jPanel6 = new javax.swing.JPanel();
		lblMsgBP = new javax.swing.JTextField();
		btnEnviarMsg = new javax.swing.JButton();
		lblTextoBP = new javax.swing.JTextArea();
		repositorioJogadorPrincipal = new javax.swing.JPanel();
		jLabel1 = new javax.swing.JLabel();
		jLabel2 = new javax.swing.JLabel();
		jLabel6 = new javax.swing.JLabel();
		cavaloJogador0 = new javax.swing.JLabel();
		jLabel8 = new javax.swing.JLabel();
		peaoJogador0 = new javax.swing.JLabel();
		damaJogador0 = new javax.swing.JLabel();
		jLabel3 = new javax.swing.JLabel();
		torreJogador0 = new javax.swing.JLabel();
		jLabel12 = new javax.swing.JLabel();
		bispoJogador0 = new javax.swing.JLabel();
		jPanel9 = new javax.swing.JPanel();
		nomeJogadorAdversario = new javax.swing.JLabel();
		nomeJogadorPrincipal = new javax.swing.JLabel();
		tempoJogadorPrincipal = new javax.swing.JLabel();
		lblEhTurnoJogador1 = new javax.swing.JLabel();
		tempoJogadorAdversario = new javax.swing.JLabel();
		lblEhTurnoJogador2 = new javax.swing.JLabel();
		jPanel10 = new javax.swing.JPanel();
		prinG1 = new javax.swing.JLabel();
		prinF1 = new javax.swing.JLabel();
		prinE1 = new javax.swing.JLabel();
		prinD1 = new javax.swing.JLabel();
		prinH1 = new javax.swing.JLabel();
		prinC1 = new javax.swing.JLabel();
		prinB1 = new javax.swing.JLabel();
		prinA1 = new javax.swing.JLabel();
		prinA3 = new javax.swing.JLabel();
		prinB3 = new javax.swing.JLabel();
		prinC3 = new javax.swing.JLabel();
		prinD3 = new javax.swing.JLabel();
		prinE3 = new javax.swing.JLabel();
		prinF3 = new javax.swing.JLabel();
		prinG3 = new javax.swing.JLabel();
		prinH3 = new javax.swing.JLabel();
		prinA2 = new javax.swing.JLabel();
		prinB2 = new javax.swing.JLabel();
		prinC2 = new javax.swing.JLabel();
		prinD2 = new javax.swing.JLabel();
		prinE2 = new javax.swing.JLabel();
		prinF2 = new javax.swing.JLabel();
		prinG2 = new javax.swing.JLabel();
		prinH2 = new javax.swing.JLabel();
		prinA8 = new javax.swing.JLabel();
		prinB8 = new javax.swing.JLabel();
		prinC8 = new javax.swing.JLabel();
		prinD8 = new javax.swing.JLabel();
		prinE8 = new javax.swing.JLabel();
		prinF8 = new javax.swing.JLabel();
		prinG8 = new javax.swing.JLabel();
		prinH8 = new javax.swing.JLabel();
		prinA7 = new javax.swing.JLabel();
		prinB7 = new javax.swing.JLabel();
		prinC7 = new javax.swing.JLabel();
		prinD7 = new javax.swing.JLabel();
		prinE7 = new javax.swing.JLabel();
		prinF7 = new javax.swing.JLabel();
		prinG7 = new javax.swing.JLabel();
		prinH7 = new javax.swing.JLabel();
		prinA6 = new javax.swing.JLabel();
		prinB6 = new javax.swing.JLabel();
		prinC6 = new javax.swing.JLabel();
		prinD6 = new javax.swing.JLabel();
		prinE5 = new javax.swing.JLabel();
		prinE6 = new javax.swing.JLabel();
		prinF6 = new javax.swing.JLabel();
		prinF5 = new javax.swing.JLabel();
		prinG5 = new javax.swing.JLabel();
		prinG6 = new javax.swing.JLabel();
		prinH6 = new javax.swing.JLabel();
		prinH5 = new javax.swing.JLabel();
		prinA4 = new javax.swing.JLabel();
		prinA5 = new javax.swing.JLabel();
		prinB5 = new javax.swing.JLabel();
		prinB4 = new javax.swing.JLabel();
		prinC4 = new javax.swing.JLabel();
		prinC5 = new javax.swing.JLabel();
		prinD5 = new javax.swing.JLabel();
		prinD4 = new javax.swing.JLabel();
		prinE4 = new javax.swing.JLabel();
		prinF4 = new javax.swing.JLabel();
		prinG4 = new javax.swing.JLabel();
		prinH4 = new javax.swing.JLabel();
		jLabel25 = new javax.swing.JLabel();
		jLabel26 = new javax.swing.JLabel();
		jLabel27 = new javax.swing.JLabel();
		jLabel28 = new javax.swing.JLabel();
		jLabel29 = new javax.swing.JLabel();
		jLabel30 = new javax.swing.JLabel();
		jLabel31 = new javax.swing.JLabel();
		jLabel32 = new javax.swing.JLabel();
		jLabel49 = new javax.swing.JLabel();
		jLabel52 = new javax.swing.JLabel();
		jLabel53 = new javax.swing.JLabel();
		jLabel56 = new javax.swing.JLabel();
		jLabel74 = new javax.swing.JLabel();
		jLabel75 = new javax.swing.JLabel();
		jLabel78 = new javax.swing.JLabel();
		jLabel79 = new javax.swing.JLabel();
		nomeJogadorPrincipal2 = new javax.swing.JLabel();
		nomeJogadorAdversario2 = new javax.swing.JLabel();
		jPanel1 = new javax.swing.JPanel();
		btnDesistir = new javax.swing.JButton();
		btnEmpate = new javax.swing.JButton();
		btnSair = new javax.swing.JButton();
		jLabel4 = new javax.swing.JLabel();
		jPanel12 = new javax.swing.JPanel();
		nomeJogadorDuplaAdversaria = new javax.swing.JLabel();
		nomeJogadorDupla = new javax.swing.JLabel();
		tempoJogadorDupla = new javax.swing.JLabel();
		lblEhTurnoJogador3 = new javax.swing.JLabel();
		tempoJogadorDuplaAdversaria = new javax.swing.JLabel();
		lblEhTurnoJogador4 = new javax.swing.JLabel();
		repJogador2 = new javax.swing.JPanel();
		jLabel24 = new javax.swing.JLabel();
		jLabel33 = new javax.swing.JLabel();
		jLabel34 = new javax.swing.JLabel();
		cavaloJogador2 = new javax.swing.JLabel();
		jLabel36 = new javax.swing.JLabel();
		peaoJogador2 = new javax.swing.JLabel();
		damaJogador2 = new javax.swing.JLabel();
		jLabel39 = new javax.swing.JLabel();
		torreJogador2 = new javax.swing.JLabel();
		jLabel41 = new javax.swing.JLabel();
		bispoJogador2 = new javax.swing.JLabel();
		repJogador1 = new javax.swing.JPanel();
		jLabel5 = new javax.swing.JLabel();
		jLabel7 = new javax.swing.JLabel();
		jLabel9 = new javax.swing.JLabel();
		cavaloJogador1 = new javax.swing.JLabel();
		jLabel10 = new javax.swing.JLabel();
		peaoJogador1 = new javax.swing.JLabel();
		damaJogador1 = new javax.swing.JLabel();
		jLabel11 = new javax.swing.JLabel();
		torreJogador1 = new javax.swing.JLabel();
		jLabel13 = new javax.swing.JLabel();
		bispoJogador1 = new javax.swing.JLabel();
		repJogador3 = new javax.swing.JPanel();
		jLabel35 = new javax.swing.JLabel();
		jLabel37 = new javax.swing.JLabel();
		jLabel38 = new javax.swing.JLabel();
		cavaloJogador3 = new javax.swing.JLabel();
		jLabel40 = new javax.swing.JLabel();
		peaoJogador3 = new javax.swing.JLabel();
		damaJogador3 = new javax.swing.JLabel();
		jLabel42 = new javax.swing.JLabel();
		torreJogador3 = new javax.swing.JLabel();
		jLabel43 = new javax.swing.JLabel();
		bispoJogador3 = new javax.swing.JLabel();

		getContentPane().setLayout(null);

		setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
		setTitle("MagChess 1.0 Jogo");
		setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
		setResizable(false);
		jPanel2.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

		jPanel2.setBorder(javax.swing.BorderFactory
				.createTitledBorder("Tabuleiro secund\u00e1rio"));
		secA1.setBackground(new java.awt.Color(0, 0, 0));
		secA1.setOpaque(true);
		jPanel2.add(secA1, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				30, 290, 34, 34));

		secB1.setBackground(new java.awt.Color(255, 255, 255));
		secB1.setOpaque(true);
		jPanel2.add(secB1, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				64, 290, 34, 34));

		secC1.setBackground(new java.awt.Color(0, 0, 0));
		secC1.setOpaque(true);
		jPanel2.add(secC1, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				98, 290, 34, 34));

		secD1.setBackground(new java.awt.Color(255, 255, 255));
		secD1.setOpaque(true);
		jPanel2.add(secD1, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				132, 290, 34, 34));

		secE1.setBackground(new java.awt.Color(0, 0, 0));
		secE1.setOpaque(true);
		jPanel2.add(secE1, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				166, 290, 34, 34));

		secF1.setBackground(new java.awt.Color(255, 255, 255));
		secF1.setOpaque(true);
		jPanel2.add(secF1, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				200, 290, 34, 34));

		secG1.setBackground(new java.awt.Color(0, 0, 0));
		secG1.setOpaque(true);
		jPanel2.add(secG1, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				234, 290, 34, 34));

		secH1.setBackground(new java.awt.Color(255, 255, 255));
		secH1.setOpaque(true);
		jPanel2.add(secH1, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				268, 290, 34, 34));

		secG2.setBackground(new java.awt.Color(255, 255, 255));
		secG2.setOpaque(true);
		jPanel2.add(secG2, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				234, 256, 34, 34));

		secF2.setBackground(new java.awt.Color(0, 0, 0));
		secF2.setOpaque(true);
		jPanel2.add(secF2, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				200, 256, 34, 34));

		secE2.setBackground(new java.awt.Color(255, 255, 255));
		secE2.setOpaque(true);
		jPanel2.add(secE2, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				166, 256, 34, 34));

		secD2.setBackground(new java.awt.Color(0, 0, 0));
		secD2.setOpaque(true);
		jPanel2.add(secD2, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				132, 256, 34, 34));

		secC2.setBackground(new java.awt.Color(255, 255, 255));
		secC2.setOpaque(true);
		jPanel2.add(secC2, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				98, 256, 34, 34));

		secB2.setBackground(new java.awt.Color(0, 0, 0));
		secB2.setOpaque(true);
		jPanel2.add(secB2, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				64, 256, 34, 34));

		secA2.setBackground(new java.awt.Color(255, 255, 255));
		secA2.setOpaque(true);
		jPanel2.add(secA2, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				30, 256, 34, 34));

		secH2.setBackground(new java.awt.Color(0, 0, 0));
		secH2.setOpaque(true);
		jPanel2.add(secH2, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				268, 256, 34, 34));

		secA3.setBackground(new java.awt.Color(0, 0, 0));
		secA3.setOpaque(true);
		jPanel2.add(secA3, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				30, 222, 34, 34));

		secA4.setBackground(new java.awt.Color(255, 255, 255));
		secA4.setOpaque(true);
		jPanel2.add(secA4, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				30, 188, 34, 34));

		secB4.setBackground(new java.awt.Color(0, 0, 0));
		secB4.setOpaque(true);
		jPanel2.add(secB4, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				64, 188, 34, 34));

		secB3.setBackground(new java.awt.Color(255, 255, 255));
		secB3.setOpaque(true);
		jPanel2.add(secB3, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				64, 222, 34, 34));

		secC3.setBackground(new java.awt.Color(0, 0, 0));
		secC3.setOpaque(true);
		jPanel2.add(secC3, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				98, 222, 34, 34));

		secC4.setBackground(new java.awt.Color(255, 255, 255));
		secC4.setOpaque(true);
		jPanel2.add(secC4, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				98, 188, 34, 34));

		secD4.setBackground(new java.awt.Color(0, 0, 0));
		secD4.setOpaque(true);
		jPanel2.add(secD4, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				132, 188, 34, 34));

		secD3.setBackground(new java.awt.Color(255, 255, 255));
		secD3.setOpaque(true);
		jPanel2.add(secD3, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				132, 222, 34, 34));

		secE4.setBackground(new java.awt.Color(255, 255, 255));
		secE4.setOpaque(true);
		jPanel2.add(secE4, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				166, 188, 34, 34));

		secE3.setBackground(new java.awt.Color(0, 0, 0));
		secE3.setOpaque(true);
		jPanel2.add(secE3, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				166, 222, 34, 34));

		secF4.setBackground(new java.awt.Color(0, 0, 0));
		secF4.setOpaque(true);
		jPanel2.add(secF4, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				200, 188, 34, 34));

		secF3.setBackground(new java.awt.Color(255, 255, 255));
		secF3.setOpaque(true);
		jPanel2.add(secF3, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				200, 222, 34, 34));

		secG4.setBackground(new java.awt.Color(255, 255, 255));
		secG4.setOpaque(true);
		jPanel2.add(secG4, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				234, 188, 34, 34));

		secG3.setBackground(new java.awt.Color(0, 0, 0));
		secG3.setOpaque(true);
		jPanel2.add(secG3, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				234, 222, 34, 34));

		secH3.setBackground(new java.awt.Color(255, 255, 255));
		secH3.setOpaque(true);
		jPanel2.add(secH3, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				268, 222, 34, 34));

		secH4.setBackground(new java.awt.Color(0, 0, 0));
		secH4.setOpaque(true);
		jPanel2.add(secH4, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				268, 188, 34, 34));

		secA5.setBackground(new java.awt.Color(0, 0, 0));
		secA5.setOpaque(true);
		jPanel2.add(secA5, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				30, 154, 34, 34));

		secA6.setBackground(new java.awt.Color(255, 255, 255));
		secA6.setOpaque(true);
		jPanel2.add(secA6, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				30, 120, 34, 34));

		secB6.setBackground(new java.awt.Color(0, 0, 0));
		secB6.setOpaque(true);
		jPanel2.add(secB6, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				64, 120, 34, 34));

		secB5.setBackground(new java.awt.Color(255, 255, 255));
		secB5.setOpaque(true);
		jPanel2.add(secB5, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				64, 154, 34, 34));

		secC5.setBackground(new java.awt.Color(0, 0, 0));
		secC5.setOpaque(true);
		jPanel2.add(secC5, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				98, 154, 34, 34));

		secC6.setBackground(new java.awt.Color(255, 255, 255));
		secC6.setOpaque(true);
		jPanel2.add(secC6, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				98, 120, 34, 34));

		secD6.setBackground(new java.awt.Color(0, 0, 0));
		secD6.setOpaque(true);
		jPanel2.add(secD6, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				132, 120, 34, 34));

		secD5.setBackground(new java.awt.Color(255, 255, 255));
		secD5.setOpaque(true);
		jPanel2.add(secD5, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				132, 154, 34, 34));

		secE6.setBackground(new java.awt.Color(255, 255, 255));
		secE6.setOpaque(true);
		jPanel2.add(secE6, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				166, 120, 34, 34));

		secE5.setBackground(new java.awt.Color(0, 0, 0));
		secE5.setOpaque(true);
		jPanel2.add(secE5, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				166, 154, 34, 34));

		secF6.setBackground(new java.awt.Color(0, 0, 0));
		secF6.setOpaque(true);
		jPanel2.add(secF6, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				200, 120, 34, 34));

		secF5.setBackground(new java.awt.Color(255, 255, 255));
		secF5.setOpaque(true);
		jPanel2.add(secF5, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				200, 154, 34, 34));

		secG6.setBackground(new java.awt.Color(255, 255, 255));
		secG6.setOpaque(true);
		jPanel2.add(secG6, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				234, 120, 34, 34));

		secG5.setBackground(new java.awt.Color(0, 0, 0));
		secG5.setOpaque(true);
		jPanel2.add(secG5, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				234, 154, 34, 34));

		secH5.setBackground(new java.awt.Color(255, 255, 255));
		secH5.setOpaque(true);
		jPanel2.add(secH5, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				268, 154, 34, 34));

		secH6.setBackground(new java.awt.Color(0, 0, 0));
		secH6.setOpaque(true);
		jPanel2.add(secH6, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				268, 120, 34, 34));

		secA7.setBackground(new java.awt.Color(0, 0, 0));
		secA7.setOpaque(true);
		jPanel2.add(secA7, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				30, 86, 34, 34));

		secA8.setBackground(new java.awt.Color(255, 255, 255));
		secA8.setOpaque(true);
		jPanel2.add(secA8, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				30, 52, 34, 34));

		secB8.setBackground(new java.awt.Color(0, 0, 0));
		secB8.setOpaque(true);
		jPanel2.add(secB8, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				64, 52, 34, 34));

		secB7.setBackground(new java.awt.Color(255, 255, 255));
		secB7.setOpaque(true);
		jPanel2.add(secB7, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				64, 86, 34, 34));

		secC7.setBackground(new java.awt.Color(0, 0, 0));
		secC7.setOpaque(true);
		jPanel2.add(secC7, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				98, 86, 34, 34));

		secC8.setBackground(new java.awt.Color(255, 255, 255));
		secC8.setOpaque(true);
		jPanel2.add(secC8, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				98, 52, 34, 34));

		secD8.setBackground(new java.awt.Color(0, 0, 0));
		secD8.setOpaque(true);
		jPanel2.add(secD8, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				132, 52, 34, 34));

		secD7.setBackground(new java.awt.Color(255, 255, 255));
		secD7.setOpaque(true);
		jPanel2.add(secD7, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				132, 86, 34, 34));

		secE8.setBackground(new java.awt.Color(255, 255, 255));
		secE8.setOpaque(true);
		jPanel2.add(secE8, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				166, 52, 34, 34));

		secE7.setBackground(new java.awt.Color(0, 0, 0));
		secE7.setOpaque(true);
		jPanel2.add(secE7, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				166, 86, 34, 34));

		secF8.setBackground(new java.awt.Color(0, 0, 0));
		secF8.setOpaque(true);
		jPanel2.add(secF8, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				200, 52, 34, 34));

		secF7.setBackground(new java.awt.Color(255, 255, 255));
		secF7.setOpaque(true);
		jPanel2.add(secF7, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				200, 86, 34, 34));

		secG8.setBackground(new java.awt.Color(255, 255, 255));
		secG8.setOpaque(true);
		jPanel2.add(secG8, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				234, 52, 34, 34));

		secG7.setBackground(new java.awt.Color(0, 0, 0));
		secG7.setOpaque(true);
		jPanel2.add(secG7, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				234, 86, 34, 34));

		secH7.setBackground(new java.awt.Color(255, 255, 255));
		secH7.setOpaque(true);
		jPanel2.add(secH7, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				268, 86, 34, 34));

		secH8.setBackground(new java.awt.Color(0, 0, 0));
		secH8.setOpaque(true);
		jPanel2.add(secH8, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				268, 52, 34, 34));

		jLabel145.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
		jLabel145.setText("A");
		jLabel145.setBorder(javax.swing.BorderFactory.createEtchedBorder());
		jPanel2.add(jLabel145,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 326, 34,
						-1));

		jLabel146.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
		jLabel146.setText("B");
		jLabel146.setBorder(javax.swing.BorderFactory.createEtchedBorder());
		jPanel2.add(jLabel146,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(64, 326, 34,
						-1));

		jLabel147.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
		jLabel147.setText("C");
		jLabel147.setBorder(javax.swing.BorderFactory.createEtchedBorder());
		jPanel2.add(jLabel147,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(98, 326, 34,
						-1));

		jLabel148.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
		jLabel148.setText("D");
		jLabel148.setBorder(javax.swing.BorderFactory.createEtchedBorder());
		jPanel2.add(jLabel148,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(132, 326, 34,
						-1));

		jLabel149.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
		jLabel149.setText("E");
		jLabel149.setBorder(javax.swing.BorderFactory.createEtchedBorder());
		jPanel2.add(jLabel149,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(166, 326, 34,
						-1));

		jLabel150.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
		jLabel150.setText("F");
		jLabel150.setBorder(javax.swing.BorderFactory.createEtchedBorder());
		jPanel2.add(jLabel150,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(200, 326, 34,
						-1));

		jLabel151.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
		jLabel151.setText("G");
		jLabel151.setBorder(javax.swing.BorderFactory.createEtchedBorder());
		jPanel2.add(jLabel151,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(234, 326, 34,
						-1));

		jLabel152.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
		jLabel152.setText("H");
		jLabel152.setBorder(javax.swing.BorderFactory.createEtchedBorder());
		jPanel2.add(jLabel152,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(268, 326, 34,
						-1));

		jLabel169.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
		jLabel169.setText("1");
		jLabel169.setBorder(javax.swing.BorderFactory.createEtchedBorder());
		jPanel2.add(jLabel169,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 290, 20,
						34));

		jLabel170.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
		jLabel170.setText("2");
		jLabel170.setBorder(javax.swing.BorderFactory.createEtchedBorder());
		jPanel2.add(jLabel170,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 256, 20,
						34));

		jLabel171.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
		jLabel171.setText("3");
		jLabel171.setBorder(javax.swing.BorderFactory.createEtchedBorder());
		jPanel2.add(jLabel171,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 222, 20,
						34));

		jLabel172.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
		jLabel172.setText("4");
		jLabel172.setBorder(javax.swing.BorderFactory.createEtchedBorder());
		jPanel2.add(jLabel172,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 186, 20,
						34));

		jLabel173.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
		jLabel173.setText("5");
		jLabel173.setBorder(javax.swing.BorderFactory.createEtchedBorder());
		jPanel2.add(jLabel173,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 152, 20,
						34));

		jLabel174.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
		jLabel174.setText("6");
		jLabel174.setBorder(javax.swing.BorderFactory.createEtchedBorder());
		jPanel2.add(jLabel174,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 118, 20,
						34));

		jLabel175.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
		jLabel175.setText("7");
		jLabel175.setBorder(javax.swing.BorderFactory.createEtchedBorder());
		jPanel2.add(jLabel175,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 84, 20,
						34));

		jLabel176.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
		jLabel176.setText("8");
		jLabel176.setBorder(javax.swing.BorderFactory.createEtchedBorder());
		jPanel2.add(jLabel176,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 50, 20,
						34));

		jLabel155.setFont(new java.awt.Font("MS Sans Serif", 1, 14));
		jLabel155.setText("Maguila");
		jPanel2.add(jLabel155,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 450, -1,
						-1));

		nomeJogadorDupla2.setFont(new java.awt.Font("MS Sans Serif", 1, 14));
		nomeJogadorDupla2.setText("Victor");
		jPanel2.add(nomeJogadorDupla2,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 350, -1,
						-1));

		nomeJogadorDuplaAdversaria2.setFont(new java.awt.Font("MS Sans Serif",
				1, 14));
		nomeJogadorDuplaAdversaria2.setText("Victor");
		jPanel2.add(nomeJogadorDuplaAdversaria2,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 30, -1,
						-1));

		getContentPane().add(jPanel2);
		jPanel2.setBounds(10, 0, 340, 380);

		jPanel4.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

		jPanel4.setBorder(javax.swing.BorderFactory
				.createTitledBorder("Reposit\u00f3rio dupla advers\u00e1ria"));
		getContentPane().add(jPanel4);
		jPanel4.setBounds(10, 480, 170, 0);

		jPanel6.setBorder(javax.swing.BorderFactory
				.createTitledBorder("Bate papo"));

		btnEnviarMsg.setText("Enviar mensagem");
		btnEnviarMsg.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent evt) {
				btnEnviarMsgActionPerformed(evt);
			}
		});

		lblTextoBP.setBackground(new java.awt.Color(255, 255, 255));
		// lblTextoBP.setVerticalAlignment(javax.swing.SwingConstants.TOP);
		lblTextoBP.setBorder(javax.swing.BorderFactory
				.createLineBorder(new java.awt.Color(0, 0, 0)));
		lblTextoBP.setOpaque(true);

		org.jdesktop.layout.GroupLayout jPanel6Layout = new org.jdesktop.layout.GroupLayout(
				jPanel6);
		jPanel6.setLayout(jPanel6Layout);
		jPanel6Layout
				.setHorizontalGroup(jPanel6Layout
						.createParallelGroup(
								org.jdesktop.layout.GroupLayout.LEADING)
						.add(
								org.jdesktop.layout.GroupLayout.TRAILING,
								jPanel6Layout
										.createSequentialGroup()
										.addContainerGap(58, Short.MAX_VALUE)
										.add(
												jPanel6Layout
														.createParallelGroup(
																org.jdesktop.layout.GroupLayout.LEADING,
																false)
														.add(
																org.jdesktop.layout.GroupLayout.TRAILING,
																jPanel6Layout
																		.createSequentialGroup()
																		.add(
																				lblMsgBP)
																		.addPreferredGap(
																				org.jdesktop.layout.LayoutStyle.RELATED)
																		.add(
																				btnEnviarMsg))
														.add(
																org.jdesktop.layout.GroupLayout.TRAILING,
																lblTextoBP,
																org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
																450,
																org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))));
		jPanel6Layout
				.setVerticalGroup(jPanel6Layout
						.createParallelGroup(
								org.jdesktop.layout.GroupLayout.LEADING)
						.add(
								org.jdesktop.layout.GroupLayout.TRAILING,
								jPanel6Layout
										.createSequentialGroup()
										.add(
												lblTextoBP,
												org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
												64, Short.MAX_VALUE)
										.addPreferredGap(
												org.jdesktop.layout.LayoutStyle.RELATED)
										.add(
												jPanel6Layout
														.createParallelGroup(
																org.jdesktop.layout.GroupLayout.BASELINE)
														.add(btnEnviarMsg)
														.add(
																lblMsgBP,
																org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
																org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
																org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))));
		getContentPane().add(jPanel6);
		jPanel6.setBounds(380, 490, 520, 120);

		repositorioJogadorPrincipal
				.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

		repositorioJogadorPrincipal.setBorder(javax.swing.BorderFactory
				.createTitledBorder("Reposit\u00f3rio "
						+ controleJogo.getNomeJogadores(JOGADORPRINCIPAL)));
		repositorioJogadorPrincipal
				.addMouseListener(new java.awt.event.MouseAdapter() {
					public void mouseClicked(java.awt.event.MouseEvent evt) {
						repJogador0MouseClicked(evt);
					}
				});

		jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource(
				TabuleiroUtils.montarStringPrincipal("Peao", getCorBaixo()))));
		repositorioJogadorPrincipal.add(jLabel1,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 20, -1,
						-1));

		jLabel2.setText(" ");
		repositorioJogadorPrincipal.add(jLabel2,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(70, 40, -1,
						-1));

		jLabel6.setIcon(new javax.swing.ImageIcon(getClass().getResource(
				TabuleiroUtils.montarStringPrincipal("Torre", getCorBaixo()))));
		repositorioJogadorPrincipal.add(jLabel6,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(170, 20, -1,
						-1));

		cavaloJogador0.setFont(new java.awt.Font("MS Sans Serif", 1, 18));
		cavaloJogador0.setText("0");
		repositorioJogadorPrincipal.add(cavaloJogador0,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 80, 10,
						-1));

		jLabel8
				.setIcon(new javax.swing.ImageIcon(getClass().getResource(
						TabuleiroUtils.montarStringPrincipal("Rainha",
								getCorBaixo()))));
		repositorioJogadorPrincipal.add(jLabel8,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 20, -1,
						-1));

		peaoJogador0.setFont(new java.awt.Font("MS Sans Serif", 1, 18));
		peaoJogador0.setText("0");
		repositorioJogadorPrincipal.add(peaoJogador0,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(40, 80, 10,
						-1));

		damaJogador0.setFont(new java.awt.Font("MS Sans Serif", 1, 18));
		damaJogador0.setText("0");
		repositorioJogadorPrincipal.add(damaJogador0,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 80, -1,
						-1));

		jLabel3
				.setIcon(new javax.swing.ImageIcon(getClass().getResource(
						TabuleiroUtils.montarStringPrincipal("Cavalo",
								getCorBaixo()))));
		repositorioJogadorPrincipal.add(jLabel3,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(70, 20, -1,
						-1));

		torreJogador0.setFont(new java.awt.Font("MS Sans Serif", 1, 18));
		torreJogador0.setText("0");
		repositorioJogadorPrincipal.add(torreJogador0,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 80, -1,
						-1));

		jLabel12.setIcon(new javax.swing.ImageIcon(getClass().getResource(
				TabuleiroUtils.montarStringPrincipal("Bispo", getCorBaixo()))));
		repositorioJogadorPrincipal.add(jLabel12,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 20, -1,
						-1));

		bispoJogador0.setFont(new java.awt.Font("MS Sans Serif", 1, 18));
		bispoJogador0.setText("0");
		repositorioJogadorPrincipal.add(bispoJogador0,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(140, 80, 10,
						-1));

		getContentPane().add(repositorioJogadorPrincipal);
		repositorioJogadorPrincipal.setBounds(910, 490, 290, 120);

		jPanel9.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

		jPanel9.setBorder(javax.swing.BorderFactory
				.createTitledBorder("Partida principal"));
		nomeJogadorAdversario
				.setFont(new java.awt.Font("MS Sans Serif", 0, 18));
		nomeJogadorAdversario.setForeground(new java.awt.Color(255, 0, 0));
		jPanel9.add(nomeJogadorAdversario,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 20, -1,
						-1));

		nomeJogadorPrincipal.setFont(new java.awt.Font("MS Sans Serif", 0, 18));
		jPanel9.add(nomeJogadorPrincipal,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 70, -1,
						20));

		tempoJogadorPrincipal
				.setFont(new java.awt.Font("MS Sans Serif", 0, 18));
		tempoJogadorPrincipal
				.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
		tempoJogadorPrincipal.setText("15:00");
		tempoJogadorPrincipal.setBorder(javax.swing.BorderFactory
				.createEtchedBorder());
		jPanel9.add(tempoJogadorPrincipal,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 70, 70,
						20));

		lblEhTurnoJogador1.setFont(new java.awt.Font("MS Sans Serif", 0, 18));
		lblEhTurnoJogador1
				.setIcon(new javax.swing.ImageIcon(
						"C:\\Documents and Settings\\User\\Desktop\\Einstein\\figuras\\Peao\\PB_Bpeq.JPG"));
		jPanel9.add(lblEhTurnoJogador1,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(230, 60, -1,
						-1));

		tempoJogadorAdversario
				.setFont(new java.awt.Font("MS Sans Serif", 0, 18));
		tempoJogadorAdversario.setForeground(new java.awt.Color(255, 0, 51));
		tempoJogadorAdversario
				.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
		tempoJogadorAdversario.setText("15:00");
		tempoJogadorAdversario.setBorder(javax.swing.BorderFactory
				.createEtchedBorder());
		jPanel9.add(tempoJogadorAdversario,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 20, 70,
						20));

		lblEhTurnoJogador2.setFont(new java.awt.Font("MS Sans Serif", 0, 18));
		lblEhTurnoJogador2
				.setIcon(new javax.swing.ImageIcon(
						"C:\\Documents and Settings\\User\\Desktop\\Einstein\\figuras\\Peao\\PB_Bpeq.JPG"));
		jPanel9.add(lblEhTurnoJogador2,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(230, 10, -1,
						40));

		getContentPane().add(jPanel9);
		jPanel9.setBounds(910, 390, 290, 100);

		jPanel10.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

		jPanel10.setBorder(javax.swing.BorderFactory
				.createTitledBorder("Tabuleiro principal"));
		jPanel10.addMouseListener(new java.awt.event.MouseAdapter() {
			public void mouseClicked(java.awt.event.MouseEvent evt) {
				jPanel10MouseClicked(evt);
			}
		});

		prinG1.setBackground(new java.awt.Color(51, 51, 51));
		prinG1.setOpaque(true);
		jPanel10.add(prinG1, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				370, 380, 48, 48));

		prinF1.setBackground(new java.awt.Color(255, 255, 255));
		prinF1.setOpaque(true);
		jPanel10.add(prinF1, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				320, 380, 48, 48));

		prinE1.setBackground(new java.awt.Color(51, 51, 51));
		prinE1.setOpaque(true);
		jPanel10.add(prinE1, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				270, 380, 48, 48));

		prinD1.setBackground(new java.awt.Color(255, 255, 255));
		prinD1.setOpaque(true);
		jPanel10.add(prinD1, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				220, 380, 48, 48));

		prinH1.setBackground(new java.awt.Color(255, 255, 255));
		prinH1.setOpaque(true);
		jPanel10.add(prinH1, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				420, 380, 48, 48));

		prinC1.setBackground(new java.awt.Color(51, 51, 51));
		prinC1.setOpaque(true);
		jPanel10.add(prinC1, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				170, 380, 48, 48));

		prinB1.setBackground(new java.awt.Color(255, 255, 255));
		prinB1.setOpaque(true);
		jPanel10.add(prinB1, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				120, 380, 48, 48));

		prinA1.setBackground(new java.awt.Color(51, 51, 51));
		prinA1.setOpaque(true);
		jPanel10.add(prinA1, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				70, 380, 48, 48));

		prinA3.setBackground(new java.awt.Color(51, 51, 51));
		prinA3.setOpaque(true);
		jPanel10.add(prinA3, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				70, 280, 48, 48));

		prinB3.setBackground(new java.awt.Color(255, 255, 255));
		prinB3.setOpaque(true);
		jPanel10.add(prinB3, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				120, 280, 48, 48));

		prinC3.setBackground(new java.awt.Color(51, 51, 51));
		prinC3.setOpaque(true);
		jPanel10.add(prinC3, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				170, 280, 48, 48));

		prinD3.setBackground(new java.awt.Color(255, 255, 255));
		prinD3.setOpaque(true);
		jPanel10.add(prinD3, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				220, 280, 48, 48));

		prinE3.setBackground(new java.awt.Color(51, 51, 51));
		prinE3.setOpaque(true);
		jPanel10.add(prinE3, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				270, 280, 48, 48));

		prinF3.setBackground(new java.awt.Color(255, 255, 255));
		prinF3.setOpaque(true);
		jPanel10.add(prinF3, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				320, 280, 48, 48));

		prinG3.setBackground(new java.awt.Color(51, 51, 51));
		prinG3.setOpaque(true);
		jPanel10.add(prinG3, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				370, 280, 48, 48));

		prinH3.setBackground(new java.awt.Color(255, 255, 255));
		prinH3.setOpaque(true);
		jPanel10.add(prinH3, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				420, 280, 48, 48));

		prinA2.setBackground(new java.awt.Color(255, 255, 255));
		prinA2.setOpaque(true);
		jPanel10.add(prinA2, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				70, 330, 48, 48));

		prinB2.setBackground(new java.awt.Color(51, 51, 51));
		prinB2.setOpaque(true);
		jPanel10.add(prinB2, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				120, 330, 48, 48));

		prinC2.setBackground(new java.awt.Color(255, 255, 255));
		prinC2.setOpaque(true);
		jPanel10.add(prinC2, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				170, 330, 48, 48));

		prinD2.setBackground(new java.awt.Color(51, 51, 51));
		prinD2.setOpaque(true);
		jPanel10.add(prinD2, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				220, 330, 48, 48));

		prinE2.setBackground(new java.awt.Color(255, 255, 255));
		prinE2.setOpaque(true);
		jPanel10.add(prinE2, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				270, 330, 48, 48));

		prinF2.setBackground(new java.awt.Color(51, 51, 51));
		prinF2.setOpaque(true);
		jPanel10.add(prinF2, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				320, 330, 48, 48));

		prinG2.setBackground(new java.awt.Color(255, 255, 255));
		prinG2.setOpaque(true);
		jPanel10.add(prinG2, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				370, 330, 48, 48));

		prinH2.setBackground(new java.awt.Color(51, 51, 51));
		prinH2.setOpaque(true);
		jPanel10.add(prinH2, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				420, 330, 48, 48));

		prinA8.setBackground(new java.awt.Color(255, 255, 255));
		prinA8.setOpaque(true);
		jPanel10.add(prinA8, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				70, 30, 48, 48));

		prinB8.setBackground(new java.awt.Color(51, 51, 51));
		prinB8.setOpaque(true);
		jPanel10.add(prinB8, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				120, 30, 48, 48));

		prinC8.setBackground(new java.awt.Color(255, 255, 255));
		prinC8.setOpaque(true);
		jPanel10.add(prinC8, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				170, 30, 48, 48));

		prinD8.setBackground(new java.awt.Color(51, 51, 51));
		prinD8.setOpaque(true);
		jPanel10.add(prinD8, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				220, 30, 48, 48));

		prinE8.setBackground(new java.awt.Color(255, 255, 255));
		prinE8.setOpaque(true);
		jPanel10.add(prinE8, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				270, 30, 48, 48));

		prinF8.setBackground(new java.awt.Color(51, 51, 51));
		prinF8.setOpaque(true);
		jPanel10.add(prinF8, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				320, 30, 48, 48));

		prinG8.setBackground(new java.awt.Color(255, 255, 255));
		prinG8.setOpaque(true);
		jPanel10.add(prinG8, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				370, 30, 48, 48));

		prinH8.setBackground(new java.awt.Color(51, 51, 51));
		prinH8.setOpaque(true);
		jPanel10.add(prinH8, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				420, 30, 48, 48));

		prinA7.setBackground(new java.awt.Color(51, 51, 51));
		prinA7.setOpaque(true);
		jPanel10.add(prinA7, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				70, 80, 48, 48));

		prinB7.setBackground(new java.awt.Color(255, 255, 255));
		prinB7.setOpaque(true);
		jPanel10.add(prinB7, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				120, 80, 48, 48));

		prinC7.setBackground(new java.awt.Color(51, 51, 51));
		prinC7.setOpaque(true);
		jPanel10.add(prinC7, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				170, 80, 48, 48));

		prinD7.setBackground(new java.awt.Color(255, 255, 255));
		prinD7.setOpaque(true);
		jPanel10.add(prinD7, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				220, 80, 48, 48));

		prinE7.setBackground(new java.awt.Color(51, 51, 51));
		prinE7.setOpaque(true);
		jPanel10.add(prinE7, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				270, 80, 48, 48));

		prinF7.setBackground(new java.awt.Color(255, 255, 255));
		prinF7.setOpaque(true);
		jPanel10.add(prinF7, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				320, 80, 48, 48));

		prinG7.setBackground(new java.awt.Color(51, 51, 51));
		prinG7.setOpaque(true);
		jPanel10.add(prinG7, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				370, 80, 48, 48));

		prinH7.setBackground(new java.awt.Color(255, 255, 255));
		prinH7.setOpaque(true);
		jPanel10.add(prinH7, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				420, 80, 48, 48));

		prinA6.setBackground(new java.awt.Color(255, 255, 255));
		prinA6.setOpaque(true);
		jPanel10.add(prinA6, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				70, 130, 48, 48));

		prinB6.setBackground(new java.awt.Color(51, 51, 51));
		prinB6.setOpaque(true);
		jPanel10.add(prinB6, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				120, 130, 48, 48));

		prinC6.setBackground(new java.awt.Color(255, 255, 255));
		prinC6.setOpaque(true);
		jPanel10.add(prinC6, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				170, 130, 48, 48));

		prinD6.setBackground(new java.awt.Color(51, 51, 51));
		prinD6.setOpaque(true);
		jPanel10.add(prinD6, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				220, 130, 48, 48));

		prinE5.setBackground(new java.awt.Color(51, 51, 51));
		prinE5.setOpaque(true);
		jPanel10.add(prinE5, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				270, 180, 48, 48));

		prinE6.setBackground(new java.awt.Color(255, 255, 255));
		prinE6.setOpaque(true);
		jPanel10.add(prinE6, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				270, 130, 48, 48));

		prinF6.setBackground(new java.awt.Color(51, 51, 51));
		prinF6.setOpaque(true);
		jPanel10.add(prinF6, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				320, 130, 48, 48));

		prinF5.setBackground(new java.awt.Color(255, 255, 255));
		prinF5.setOpaque(true);
		jPanel10.add(prinF5, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				320, 180, 48, 48));

		prinG5.setBackground(new java.awt.Color(51, 51, 51));
		prinG5.setOpaque(true);
		jPanel10.add(prinG5, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				370, 180, 48, 48));

		prinG6.setBackground(new java.awt.Color(255, 255, 255));
		prinG6.setOpaque(true);
		jPanel10.add(prinG6, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				370, 130, 48, 48));

		prinH6.setBackground(new java.awt.Color(51, 51, 51));
		prinH6.setOpaque(true);
		jPanel10.add(prinH6, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				420, 130, 48, 48));

		prinH5.setBackground(new java.awt.Color(255, 255, 255));
		prinH5.setOpaque(true);
		jPanel10.add(prinH5, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				420, 180, 48, 48));

		prinA4.setBackground(new java.awt.Color(255, 255, 255));
		prinA4.setOpaque(true);
		jPanel10.add(prinA4, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				70, 230, 48, 48));

		prinA5.setBackground(new java.awt.Color(51, 51, 51));
		prinA5.setOpaque(true);
		jPanel10.add(prinA5, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				70, 180, 48, 48));

		prinB5.setBackground(new java.awt.Color(255, 255, 255));
		prinB5.setOpaque(true);
		jPanel10.add(prinB5, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				120, 180, 48, 48));

		prinB4.setBackground(new java.awt.Color(51, 51, 51));
		prinB4.setOpaque(true);
		jPanel10.add(prinB4, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				120, 230, 48, 48));

		prinC4.setBackground(new java.awt.Color(255, 255, 255));
		prinC4.setOpaque(true);
		jPanel10.add(prinC4, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				170, 230, 48, 48));

		prinC5.setBackground(new java.awt.Color(51, 51, 51));
		prinC5.setOpaque(true);
		jPanel10.add(prinC5, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				170, 180, 48, 48));

		prinD5.setBackground(new java.awt.Color(255, 255, 255));
		prinD5.setOpaque(true);
		jPanel10.add(prinD5, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				220, 180, 48, 48));

		prinD4.setBackground(new java.awt.Color(51, 51, 51));
		prinD4.setOpaque(true);
		jPanel10.add(prinD4, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				220, 230, 48, 48));

		prinE4.setBackground(new java.awt.Color(255, 255, 255));
		prinE4.setOpaque(true);
		jPanel10.add(prinE4, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				270, 230, 48, 48));

		prinF4.setBackground(new java.awt.Color(51, 51, 51));
		prinF4.setOpaque(true);
		jPanel10.add(prinF4, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				320, 230, 48, 48));

		prinG4.setBackground(new java.awt.Color(255, 255, 255));
		prinG4.setOpaque(true);
		jPanel10.add(prinG4, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				370, 230, 48, 48));

		prinH4.setBackground(new java.awt.Color(51, 51, 51));
		prinH4.setOpaque(true);
		jPanel10.add(prinH4, new org.netbeans.lib.awtextra.AbsoluteConstraints(
				420, 230, 48, 48));

		jLabel25.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
		jLabel25.setText("A");
		jLabel25.setBorder(javax.swing.BorderFactory.createEtchedBorder());
		jPanel10.add(jLabel25,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(70, 430, 50,
						20));

		jLabel26.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
		jLabel26.setText("B");
		jLabel26.setBorder(javax.swing.BorderFactory.createEtchedBorder());
		jPanel10.add(jLabel26,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 430, 50,
						20));

		jLabel27.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
		jLabel27.setText("C");
		jLabel27.setBorder(javax.swing.BorderFactory.createEtchedBorder());
		jPanel10.add(jLabel27,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(170, 430, 50,
						20));

		jLabel28.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
		jLabel28.setText("D");
		jLabel28.setBorder(javax.swing.BorderFactory.createEtchedBorder());
		jPanel10.add(jLabel28,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 430, 50,
						20));

		jLabel29.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
		jLabel29.setText("E");
		jLabel29.setBorder(javax.swing.BorderFactory.createEtchedBorder());
		jPanel10.add(jLabel29,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(270, 430, 50,
						20));

		jLabel30.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
		jLabel30.setText("F");
		jLabel30.setBorder(javax.swing.BorderFactory.createEtchedBorder());
		jPanel10.add(jLabel30,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(320, 430, 50,
						20));

		jLabel31.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
		jLabel31.setText("G");
		jLabel31.setBorder(javax.swing.BorderFactory.createEtchedBorder());
		jPanel10.add(jLabel31,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(370, 430, 50,
						20));

		jLabel32.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
		jLabel32.setText("H");
		jLabel32.setBorder(javax.swing.BorderFactory.createEtchedBorder());
		jPanel10.add(jLabel32,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(420, 430, 50,
						20));

		jLabel49.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
		jLabel49.setText("1");
		jLabel49.setBorder(javax.swing.BorderFactory.createEtchedBorder());
		jPanel10.add(jLabel49,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 380, 20,
						50));

		jLabel52.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
		jLabel52.setText("2");
		jLabel52.setBorder(javax.swing.BorderFactory.createEtchedBorder());
		jPanel10.add(jLabel52,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 330, 20,
						50));

		jLabel53.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
		jLabel53.setText("3");
		jLabel53.setBorder(javax.swing.BorderFactory.createEtchedBorder());
		jPanel10.add(jLabel53,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 280, 20,
						50));

		jLabel56.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
		jLabel56.setText("4");
		jLabel56.setBorder(javax.swing.BorderFactory.createEtchedBorder());
		jPanel10.add(jLabel56,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 230, 20,
						50));

		jLabel74.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
		jLabel74.setText("5");
		jLabel74.setBorder(javax.swing.BorderFactory.createEtchedBorder());
		jPanel10.add(jLabel74,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 180, 20,
						50));

		jLabel75.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
		jLabel75.setText("6");
		jLabel75.setBorder(javax.swing.BorderFactory.createEtchedBorder());
		jPanel10.add(jLabel75,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 130, 20,
						50));

		jLabel78.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
		jLabel78.setText("7");
		jLabel78.setBorder(javax.swing.BorderFactory.createEtchedBorder());
		jPanel10.add(jLabel78,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 80, 20,
						50));

		jLabel79.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
		jLabel79.setText("8");
		jLabel79.setBorder(javax.swing.BorderFactory.createEtchedBorder());
		jPanel10.add(jLabel79,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 30, 20,
						50));

		nomeJogadorPrincipal2
				.setFont(new java.awt.Font("MS Sans Serif", 1, 14));
		nomeJogadorPrincipal2.setText("Maguila");
		jPanel10.add(nomeJogadorPrincipal2,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 450, -1,
						-1));

		nomeJogadorAdversario2
				.setFont(new java.awt.Font("MS Sans Serif", 1, 14));
		nomeJogadorAdversario2.setText("Maguila");
		jPanel10.add(nomeJogadorAdversario2,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 10, -1,
						-1));

		getContentPane().add(jPanel10);
		jPanel10.setBounds(380, 10, 520, 480);

		jPanel1.setBorder(javax.swing.BorderFactory
				.createTitledBorder("Op\u00e7\u00f5es de jogo"));
		btnDesistir.setText("Desisitir");

		btnEmpate.setText("Oferecer empate");

		btnSair.setText("Sair");

		org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(
				jPanel1);
		jPanel1.setLayout(jPanel1Layout);
		jPanel1Layout.setHorizontalGroup(jPanel1Layout.createParallelGroup(
				org.jdesktop.layout.GroupLayout.LEADING).add(
				jPanel1Layout.createSequentialGroup().add(btnDesistir)
						.addPreferredGap(
								org.jdesktop.layout.LayoutStyle.RELATED).add(
								btnEmpate).addPreferredGap(
								org.jdesktop.layout.LayoutStyle.RELATED).add(
								btnSair,
								org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
								80, Short.MAX_VALUE)));
		jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(
				org.jdesktop.layout.GroupLayout.LEADING).add(
				jPanel1Layout.createParallelGroup(
						org.jdesktop.layout.GroupLayout.BASELINE).add(
						btnDesistir).add(btnEmpate).add(btnSair)));
		getContentPane().add(jPanel1);
		jPanel1.setBounds(910, 220, 290, 50);

		jLabel4.setFont(new java.awt.Font("Arial", 1, 18));
		jLabel4.setText("MagChess 1.0 ");
		getContentPane().add(jLabel4);
		jLabel4.setBounds(910, 20, 150, 20);

		jPanel12.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

		jPanel12.setBorder(javax.swing.BorderFactory
				.createTitledBorder("Partida principal"));
		nomeJogadorDuplaAdversaria.setFont(new java.awt.Font("MS Sans Serif",
				0, 18));
		nomeJogadorDuplaAdversaria.setForeground(new java.awt.Color(255, 0, 0));
		nomeJogadorDuplaAdversaria.setText("Lima");
		jPanel12.add(nomeJogadorDuplaAdversaria,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 20, -1,
						-1));

		nomeJogadorDupla.setFont(new java.awt.Font("MS Sans Serif", 0, 18));
		nomeJogadorDupla.setText("Dionisio");
		jPanel12.add(nomeJogadorDupla,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 70, -1,
						20));

		tempoJogadorDupla.setFont(new java.awt.Font("MS Sans Serif", 0, 18));
		tempoJogadorDupla
				.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
		tempoJogadorDupla.setText("15:00");
		tempoJogadorDupla.setBorder(javax.swing.BorderFactory
				.createEtchedBorder());
		jPanel12.add(tempoJogadorDupla,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(140, 70, 70,
						20));

		lblEhTurnoJogador3.setFont(new java.awt.Font("MS Sans Serif", 0, 18));
		lblEhTurnoJogador3
				.setIcon(new javax.swing.ImageIcon(
						"C:\\Documents and Settings\\User\\Desktop\\Einstein\\figuras\\Peao\\PB_Bpeq.JPG"));
		jPanel12.add(lblEhTurnoJogador3,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 60, -1,
						-1));

		tempoJogadorDuplaAdversaria.setFont(new java.awt.Font("MS Sans Serif",
				0, 18));
		tempoJogadorDuplaAdversaria
				.setForeground(new java.awt.Color(255, 0, 51));
		tempoJogadorDuplaAdversaria
				.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
		tempoJogadorDuplaAdversaria.setText("15:00");
		tempoJogadorDuplaAdversaria.setBorder(javax.swing.BorderFactory
				.createEtchedBorder());
		jPanel12.add(tempoJogadorDuplaAdversaria,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(140, 20, 70,
						20));

		lblEhTurnoJogador4.setFont(new java.awt.Font("MS Sans Serif", 0, 18));
		lblEhTurnoJogador4
				.setIcon(new javax.swing.ImageIcon(
						"C:\\Documents and Settings\\User\\Desktop\\Einstein\\figuras\\Peao\\PB_Bpeq.JPG"));
		jPanel12.add(lblEhTurnoJogador4,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 10, -1,
						40));

		getContentPane().add(jPanel12);
		jPanel12.setBounds(10, 380, 340, 100);

		repJogador2.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

		repJogador2.setBorder(javax.swing.BorderFactory
				.createTitledBorder("Reposit\u00f3rio "
						+ controleJogo.getNomeJogadores(DUPLAADVERSARIA)));
		jLabel24.setIcon(new javax.swing.ImageIcon(getClass().getResource(
				TabuleiroUtils.montarStringRepositorioPrincipal("Peao",
						getCorBaixo()))));
		repJogador2.add(jLabel24,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 20, -1,
						-1));

		jLabel33.setText(" ");
		repJogador2.add(jLabel33,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(70, 40, -1,
						-1));

		jLabel34.setIcon(new javax.swing.ImageIcon(getClass().getResource(
				TabuleiroUtils.montarStringRepositorioPrincipal("Torre",
						getCorBaixo()))));
		repJogador2.add(jLabel34,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(100, 20, -1,
						-1));

		cavaloJogador2.setFont(new java.awt.Font("MS Sans Serif", 1, 18));
		cavaloJogador2.setText("0");
		repJogador2.add(cavaloJogador2,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 50, 10,
						-1));

		jLabel36.setIcon(new javax.swing.ImageIcon(getClass().getResource(
				TabuleiroUtils.montarStringRepositorioPrincipal("Rainha",
						getCorBaixo()))));
		repJogador2.add(jLabel36,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 20, -1,
						-1));

		peaoJogador2.setFont(new java.awt.Font("MS Sans Serif", 1, 18));
		peaoJogador2.setText("0");
		repJogador2.add(peaoJogador2,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 50, 10,
						-1));

		damaJogador2.setFont(new java.awt.Font("MS Sans Serif", 1, 18));
		damaJogador2.setText("0");
		repJogador2.add(damaJogador2,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(140, 50, -1,
						-1));

		jLabel39.setIcon(new javax.swing.ImageIcon(getClass().getResource(
				TabuleiroUtils.montarStringRepositorioPrincipal("Cavalo",
						getCorBaixo()))));
		repJogador2.add(jLabel39,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(40, 20, -1,
						-1));

		torreJogador2.setFont(new java.awt.Font("MS Sans Serif", 1, 18));
		torreJogador2.setText("0");
		repJogador2.add(torreJogador2,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 50, -1,
						-1));

		jLabel41.setIcon(new javax.swing.ImageIcon(getClass().getResource(
				TabuleiroUtils.montarStringRepositorioPrincipal("Bispo",
						getCorBaixo()))));
		repJogador2.add(jLabel41,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(70, 20, -1,
						-1));

		bispoJogador2.setFont(new java.awt.Font("MS Sans Serif", 1, 18));
		bispoJogador2.setText("0");
		repJogador2.add(bispoJogador2,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 50, 10,
						-1));

		getContentPane().add(repJogador2);
		repJogador2.setBounds(10, 490, 170, 80);

		repJogador1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

		repJogador1.setBorder(javax.swing.BorderFactory
				.createTitledBorder("Reposit\u00f3rio "
						+ controleJogo.getNomeJogadores(ADVERSARIO)));
		repJogador1.addMouseListener(new java.awt.event.MouseAdapter() {
			public void mouseClicked(java.awt.event.MouseEvent evt) {
				repJogador1MouseClicked(evt);
			}
		});

		jLabel5.setIcon(new javax.swing.ImageIcon(getClass().getResource(
				TabuleiroUtils.montarStringPrincipal("Peao", getCorCima()))));
		repJogador1.add(jLabel5,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 20, -1,
						-1));

		jLabel7.setText(" ");
		repJogador1.add(jLabel7,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(70, 40, -1,
						-1));

		jLabel9.setIcon(new javax.swing.ImageIcon(getClass().getResource(
				TabuleiroUtils.montarStringPrincipal("Torre", getCorCima()))));
		repJogador1.add(jLabel9,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(170, 20, -1,
						-1));

		cavaloJogador1.setFont(new java.awt.Font("MS Sans Serif", 1, 18));
		cavaloJogador1.setText("0");
		repJogador1.add(cavaloJogador1,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 80, 10,
						-1));

		jLabel10.setIcon(new javax.swing.ImageIcon(getClass().getResource(
				TabuleiroUtils.montarStringPrincipal("Rainha", getCorCima()))));
		repJogador1.add(jLabel10,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 20, -1,
						-1));

		peaoJogador1.setFont(new java.awt.Font("MS Sans Serif", 1, 18));
		peaoJogador1.setText("0");
		repJogador1.add(peaoJogador1,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(40, 80, 10,
						-1));

		damaJogador1.setFont(new java.awt.Font("MS Sans Serif", 1, 18));
		damaJogador1.setText("0");
		repJogador1.add(damaJogador1,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 80, -1,
						-1));

		jLabel11.setIcon(new javax.swing.ImageIcon(getClass().getResource(
				TabuleiroUtils.montarStringPrincipal("Cavalo", getCorCima()))));
		repJogador1.add(jLabel11,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(70, 20, -1,
						-1));

		torreJogador1.setFont(new java.awt.Font("MS Sans Serif", 1, 18));
		torreJogador1.setText("0");
		repJogador1.add(torreJogador1,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 80, -1,
						-1));

		jLabel13.setIcon(new javax.swing.ImageIcon(getClass().getResource(
				TabuleiroUtils.montarStringPrincipal("Bispo", getCorCima()))));
		repJogador1.add(jLabel13,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 20, -1,
						-1));

		bispoJogador1.setFont(new java.awt.Font("MS Sans Serif", 1, 18));
		bispoJogador1.setText("0");
		repJogador1.add(bispoJogador1,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(140, 80, 10,
						-1));

		getContentPane().add(repJogador1);
		repJogador1.setBounds(910, 270, 290, 120);

		repJogador3.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

		repJogador3.setBorder(javax.swing.BorderFactory
				.createTitledBorder("Reposit\u00f3rio "
						+ controleJogo.getNomeJogadores(DUPLA)));
		jLabel35.setIcon(new javax.swing.ImageIcon(getClass().getResource(
				TabuleiroUtils.montarStringRepositorioPrincipal("Peao",
						getCorCima()))));
		repJogador3.add(jLabel35,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 20, -1,
						-1));

		jLabel37.setText(" ");
		repJogador3.add(jLabel37,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(70, 40, -1,
						-1));

		jLabel38.setIcon(new javax.swing.ImageIcon(getClass().getResource(
				TabuleiroUtils.montarStringRepositorioPrincipal("Torre",
						getCorCima()))));
		repJogador3.add(jLabel38,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(100, 20, -1,
						-1));

		cavaloJogador3.setFont(new java.awt.Font("MS Sans Serif", 1, 18));
		cavaloJogador3.setText("0");
		repJogador3.add(cavaloJogador3,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 50, 10,
						-1));

		jLabel40.setIcon(new javax.swing.ImageIcon(getClass().getResource(
				TabuleiroUtils.montarStringRepositorioPrincipal("Rainha",
						getCorCima()))));
		repJogador3.add(jLabel40,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 20, -1,
						-1));

		peaoJogador3.setFont(new java.awt.Font("MS Sans Serif", 1, 18));
		peaoJogador3.setText("0");
		repJogador3.add(peaoJogador3,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 50, 10,
						-1));

		damaJogador3.setFont(new java.awt.Font("MS Sans Serif", 1, 18));
		damaJogador3.setText("0");
		repJogador3.add(damaJogador3,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(140, 50, -1,
						-1));

		jLabel42.setIcon(new javax.swing.ImageIcon(getClass().getResource(
				TabuleiroUtils.montarStringRepositorioPrincipal("Cavalo",
						getCorCima()))));
		repJogador3.add(jLabel42,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(40, 20, -1,
						-1));

		torreJogador3.setFont(new java.awt.Font("MS Sans Serif", 1, 18));
		torreJogador3.setText("0");
		repJogador3.add(torreJogador3,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 50, -1,
						-1));

		jLabel43.setIcon(new javax.swing.ImageIcon(getClass().getResource(
				TabuleiroUtils.montarStringRepositorioPrincipal("Bispo",
						getCorCima()))));
		repJogador3.add(jLabel43,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(70, 20, -1,
						-1));

		bispoJogador3.setFont(new java.awt.Font("MS Sans Serif", 1, 18));
		bispoJogador3.setText("0");
		repJogador3.add(bispoJogador3,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 50, 10,
						-1));

		getContentPane().add(repJogador3);
		repJogador3.setBounds(180, 490, 170, 80);

		pack();
	}// </editor-fold>//GEN-END:initComponents

	private void btnEnviarMsgActionPerformed(@SuppressWarnings("unused")
	java.awt.event.ActionEvent evt) {
		atualizarBP(lblMsgBP.getText(), getControleJogo()
				.getNomeJogadorPrincipal());
		controleJogo.solicitaAtualizacaoBP(lblMsgBP.getText());
		lblMsgBP.setText("");
	}

	private void repJogador0MouseClicked(java.awt.event.MouseEvent evt) {
		if (!verificarTurnoJogadorAlvo(0) || !validateRepositoryClick(evt))
			return;
		int indicePeca = (evt.getX() - 20) / 50;
		if (Integer.parseInt(repositoriosJogador[JOGADORPRINCIPAL][indicePeca]
				.getText()) > 0)
			controleJogo.tratarRepositorio(indicePeca);

	}

	private boolean validateRepositoryClick(java.awt.event.MouseEvent evt) {
		if (evt.getY() <= 70 && evt.getY() >= 20)
			if (evt.getX() >= 20 && evt.getX() <= 270)
				return true;
		return false;
	}

	public void atualizarTabuleiroPrincipal(Jogada jogada) {
		boolean ehCaptura = jogada.getCaptura();
		Casa casaInicial = jogada.getPosicaoInicial();
		Casa casaFinal = jogada.getPosicaoFinal();
		boolean p_repositorio = jogada.getJogadaRepositorio();
		String nomePeca = jogada.getNomePeca();
		String corPeca = jogada.getCorPeca();
		String tipoRoque = jogada.getTipoRoque();
		if (ehCaptura)
			casasTabuleiroPrincipal[casaFinal.getLinha()][casaFinal.getColuna()]
					.setIcon(null);
		casasTabuleiroPrincipal[casaFinal.getLinha()][casaFinal.getColuna()]
				.setIcon(new javax.swing.ImageIcon(getClass().getResource(
						TabuleiroUtils.montaStringPrincipal(casaFinal,
								nomePeca, corPeca))));
		if (!p_repositorio) {
			casasTabuleiroPrincipal[casaInicial.getLinha()][casaInicial
					.getColuna()].setIcon(null);
			tipoRoque = "";
			if (!(tipoRoque = JogadaUtils.reiTentandoRoque(jogada)).equals(""))
				tratarRoque(jogada, tipoRoque, false, "Principal");
		}

	}

	public void atualizarTabuleiroSecundario(Jogada jogada) {
		boolean ehCaptura = jogada.getCaptura();
		Casa casaInicial = jogada.getPosicaoInicial();
		Casa casaFinal = jogada.getPosicaoFinal();
		boolean jogadaRepositorio = jogada.getJogadaRepositorio();
		String nomePeca = jogada.getNomePeca();
		String corPeca = jogada.getCorPeca();
		String tipoRoque = jogada.getTipoRoque();
		if (ehCaptura)
			casasTabuleiroSecundario[casaInicial.getLinha()][casaFinal
					.getColuna()].setIcon(null);
		casasTabuleiroSecundario[casaFinal.getLinha()][casaFinal.getColuna()]
				.setIcon(new javax.swing.ImageIcon(getClass().getResource(
						TabuleiroUtils.montaStringSecundario(casaFinal,
								nomePeca, corPeca))));
		if (!jogadaRepositorio)
			casasTabuleiroSecundario[casaInicial.getLinha()][casaInicial
					.getColuna()].setIcon(null);
		tipoRoque = "";
		if (!(tipoRoque = JogadaUtils.reiTentandoRoque(jogada)).equals(""))
			tratarRoque(jogada, tipoRoque, true, "Secundario");

	}

	public void incrementarRepositorioAlvo(int numeroRepositorio, int indicePeca) {
		int valorAtual = Integer
				.parseInt(repositoriosJogador[numeroRepositorio][indicePeca]
						.getText());
		valorAtual++;
		repositoriosJogador[numeroRepositorio][indicePeca].setText(String
				.valueOf(valorAtual));
	}

	public void decrementarRepositorioAlvo(int numeroRepositorio, int indicePeca) {
		int valorAtual = Integer
				.parseInt(repositoriosJogador[numeroRepositorio][indicePeca]
						.getText());
		valorAtual--;
		repositoriosJogador[numeroRepositorio][indicePeca].setText(String
				.valueOf(valorAtual));
	}

	private int getXJogada(java.awt.event.MouseEvent evt) {
		return (evt.getX() - 70) / 50;
	}

	private int getYJogada(java.awt.event.MouseEvent evt) {
		return 7 - ((evt.getY() - 30) / 50);
	}

	private boolean validarPosicaoClicadaTabuleiro(java.awt.event.MouseEvent evt) {
		if (evt.getX() >= 70 && evt.getX() <= 470)
			if (evt.getY() >= 30 && evt.getY() <= 420)
				return true;
		return false;
	}

	private boolean validarPosicaoClicadaRepositorio(
			java.awt.event.MouseEvent evt) {
		if (evt.getX() >= 20 && evt.getX() <= 240)
			if (evt.getY() >= 20 && evt.getY() <= 70)
				return true;
		return false;
	}

	private int getXJogadaRepositorio(java.awt.event.MouseEvent evt) {
		return (evt.getX() - 20 / 50);
	}

	private void repJogador1MouseClicked(java.awt.event.MouseEvent evt) {// GEN-FIRST:event_repJogador1MouseClicked
		if (verificarTurnoJogadorAlvo(0))
			if (validarPosicaoClicadaRepositorio(evt))
				getControleJogo().tratarRepositorio(getXJogadaRepositorio(evt));
	}// GEN-LAST:event_repJogador1MouseClicked

	private void jPanel10MouseClicked(java.awt.event.MouseEvent evt) {// GEN-FIRST:event_jPanel10MouseClicked
		if (verificarTurnoJogadorAlvo(0))
			if (validarPosicaoClicadaTabuleiro(evt))
				getControleJogo().tratarJogadaTabuleiro(getYJogada(evt),
						getXJogada(evt));

	}

	private javax.swing.JLabel damaJogador0;
	private javax.swing.JLabel damaJogador1;
	private javax.swing.JLabel damaJogador2;
	private javax.swing.JLabel damaJogador3;
	private javax.swing.JButton btnDesistir;
	private javax.swing.JButton btnEmpate;
	private javax.swing.JButton btnEnviarMsg;
	private javax.swing.JButton btnSair;
	private javax.swing.JLabel torreJogador0;
	private javax.swing.JLabel torreJogador1;
	private javax.swing.JLabel torreJogador2;
	private javax.swing.JLabel torreJogador3;
	private javax.swing.JLabel bispoJogador0;
	private javax.swing.JLabel bispoJogador1;
	private javax.swing.JLabel bispoJogador2;
	private javax.swing.JLabel bispoJogador3;
	private javax.swing.JLabel jLabel1;
	private javax.swing.JLabel jLabel10;
	private javax.swing.JLabel jLabel11;
	private javax.swing.JLabel jLabel12;
	private javax.swing.JLabel jLabel13;
	private javax.swing.JLabel jLabel145;
	private javax.swing.JLabel jLabel146;
	private javax.swing.JLabel jLabel147;
	private javax.swing.JLabel jLabel148;
	private javax.swing.JLabel jLabel149;
	private javax.swing.JLabel jLabel150;
	private javax.swing.JLabel jLabel151;
	private javax.swing.JLabel jLabel152;
	private javax.swing.JLabel jLabel155;
	private javax.swing.JLabel jLabel169;
	private javax.swing.JLabel jLabel170;
	private javax.swing.JLabel jLabel171;
	private javax.swing.JLabel jLabel172;
	private javax.swing.JLabel jLabel173;
	private javax.swing.JLabel jLabel174;
	private javax.swing.JLabel jLabel175;
	private javax.swing.JLabel jLabel176;
	private javax.swing.JLabel jLabel2;
	private javax.swing.JLabel jLabel24;
	private javax.swing.JLabel jLabel25;
	private javax.swing.JLabel jLabel26;
	private javax.swing.JLabel jLabel27;
	private javax.swing.JLabel jLabel28;
	private javax.swing.JLabel jLabel29;
	private javax.swing.JLabel jLabel3;
	private javax.swing.JLabel jLabel30;
	private javax.swing.JLabel jLabel31;
	private javax.swing.JLabel jLabel32;
	private javax.swing.JLabel jLabel33;
	private javax.swing.JLabel jLabel34;
	private javax.swing.JLabel jLabel35;
	private javax.swing.JLabel jLabel36;
	private javax.swing.JLabel jLabel37;
	private javax.swing.JLabel jLabel38;
	private javax.swing.JLabel jLabel39;
	private javax.swing.JLabel jLabel4;
	private javax.swing.JLabel jLabel40;
	private javax.swing.JLabel jLabel41;
	private javax.swing.JLabel jLabel42;
	private javax.swing.JLabel jLabel43;
	private javax.swing.JLabel jLabel49;
	private javax.swing.JLabel jLabel5;
	private javax.swing.JLabel jLabel52;
	private javax.swing.JLabel jLabel53;
	private javax.swing.JLabel jLabel56;
	private javax.swing.JLabel jLabel6;
	private javax.swing.JLabel jLabel7;
	private javax.swing.JLabel jLabel74;
	private javax.swing.JLabel jLabel75;
	private javax.swing.JLabel jLabel78;
	private javax.swing.JLabel jLabel79;
	private javax.swing.JLabel jLabel8;
	private javax.swing.JLabel jLabel9;
	private javax.swing.JPanel jPanel1;
	private javax.swing.JPanel jPanel10;
	private javax.swing.JPanel jPanel12;
	private javax.swing.JPanel jPanel2;
	private javax.swing.JPanel jPanel4;
	private javax.swing.JPanel jPanel6;
	private javax.swing.JPanel jPanel9;
	private javax.swing.JLabel nomeJogadorPrincipal2;
	private javax.swing.JLabel nomeJogadorAdversario2;
	private javax.swing.JLabel nomeJogadorDupla2;
	private javax.swing.JLabel nomeJogadorDuplaAdversaria2;
	private javax.swing.JLabel lblEhTurnoJogador1;
	private javax.swing.JLabel lblEhTurnoJogador2;
	private javax.swing.JLabel lblEhTurnoJogador3;
	private javax.swing.JLabel lblEhTurnoJogador4;
	private javax.swing.JTextField lblMsgBP;
	private javax.swing.JLabel nomeJogadorPrincipal;
	private javax.swing.JLabel nomeJogadorAdversario;
	private javax.swing.JLabel nomeJogadorDupla;
	private javax.swing.JLabel nomeJogadorDuplaAdversaria;
	private javax.swing.JLabel tempoJogadorPrincipal;
	private javax.swing.JLabel tempoJogadorAdversario;
	private javax.swing.JLabel tempoJogadorDuplaAdversaria;
	private javax.swing.JLabel tempoJogadorDupla;
	private javax.swing.JTextArea lblTextoBP;
	private javax.swing.JLabel peaoJogador0;
	private javax.swing.JLabel peaoJogador1;
	private javax.swing.JLabel peaoJogador2;
	private javax.swing.JLabel peaoJogador3;
	private javax.swing.JLabel prinA1;
	private javax.swing.JLabel prinA2;
	private javax.swing.JLabel prinA3;
	private javax.swing.JLabel prinA4;
	private javax.swing.JLabel prinA5;
	private javax.swing.JLabel prinA6;
	private javax.swing.JLabel prinA7;
	private javax.swing.JLabel prinA8;
	private javax.swing.JLabel prinB1;
	private javax.swing.JLabel prinB2;
	private javax.swing.JLabel prinB3;
	private javax.swing.JLabel prinB4;
	private javax.swing.JLabel prinB5;
	private javax.swing.JLabel prinB6;
	private javax.swing.JLabel prinB7;
	private javax.swing.JLabel prinB8;
	private javax.swing.JLabel prinC1;
	private javax.swing.JLabel prinC2;
	private javax.swing.JLabel prinC3;
	private javax.swing.JLabel prinC4;
	private javax.swing.JLabel prinC5;
	private javax.swing.JLabel prinC6;
	private javax.swing.JLabel prinC7;
	private javax.swing.JLabel prinC8;
	private javax.swing.JLabel prinD1;
	private javax.swing.JLabel prinD2;
	private javax.swing.JLabel prinD3;
	private javax.swing.JLabel prinD4;
	private javax.swing.JLabel prinD5;
	private javax.swing.JLabel prinD6;
	private javax.swing.JLabel prinD7;
	private javax.swing.JLabel prinD8;
	private javax.swing.JLabel prinE1;
	private javax.swing.JLabel prinE2;
	private javax.swing.JLabel prinE3;
	private javax.swing.JLabel prinE4;
	private javax.swing.JLabel prinE5;
	private javax.swing.JLabel prinE6;
	private javax.swing.JLabel prinE7;
	private javax.swing.JLabel prinE8;
	private javax.swing.JLabel prinF1;
	private javax.swing.JLabel prinF2;
	private javax.swing.JLabel prinF3;
	private javax.swing.JLabel prinF4;
	private javax.swing.JLabel prinF5;
	private javax.swing.JLabel prinF6;
	private javax.swing.JLabel prinF7;
	private javax.swing.JLabel prinF8;
	private javax.swing.JLabel prinG1;
	private javax.swing.JLabel prinG2;
	private javax.swing.JLabel prinG3;
	private javax.swing.JLabel prinG4;
	private javax.swing.JLabel prinG5;
	private javax.swing.JLabel prinG6;
	private javax.swing.JLabel prinG7;
	private javax.swing.JLabel prinG8;
	private javax.swing.JLabel prinH1;
	private javax.swing.JLabel prinH2;
	private javax.swing.JLabel prinH3;
	private javax.swing.JLabel prinH4;
	private javax.swing.JLabel prinH5;
	private javax.swing.JLabel prinH6;
	private javax.swing.JLabel prinH7;
	private javax.swing.JLabel prinH8;
	private javax.swing.JPanel repositorioJogadorPrincipal;
	private javax.swing.JPanel repJogador1;
	private javax.swing.JPanel repJogador2;
	private javax.swing.JPanel repJogador3;
	private javax.swing.JLabel secA1;
	private javax.swing.JLabel secA2;
	private javax.swing.JLabel secA3;
	private javax.swing.JLabel secA4;
	private javax.swing.JLabel secA5;
	private javax.swing.JLabel secA6;
	private javax.swing.JLabel secA7;
	private javax.swing.JLabel secA8;
	private javax.swing.JLabel secB1;
	private javax.swing.JLabel secB2;
	private javax.swing.JLabel secB3;
	private javax.swing.JLabel secB4;
	private javax.swing.JLabel secB5;
	private javax.swing.JLabel secB6;
	private javax.swing.JLabel secB7;
	private javax.swing.JLabel secB8;
	private javax.swing.JLabel secC1;
	private javax.swing.JLabel secC2;
	private javax.swing.JLabel secC3;
	private javax.swing.JLabel secC4;
	private javax.swing.JLabel secC5;
	private javax.swing.JLabel secC6;
	private javax.swing.JLabel secC7;
	private javax.swing.JLabel secC8;
	private javax.swing.JLabel secD1;
	private javax.swing.JLabel secD2;
	private javax.swing.JLabel secD3;
	private javax.swing.JLabel secD4;
	private javax.swing.JLabel secD5;
	private javax.swing.JLabel secD6;
	private javax.swing.JLabel secD7;
	private javax.swing.JLabel secD8;
	private javax.swing.JLabel secE1;
	private javax.swing.JLabel secE2;
	private javax.swing.JLabel secE3;
	private javax.swing.JLabel secE4;
	private javax.swing.JLabel secE5;
	private javax.swing.JLabel secE6;
	private javax.swing.JLabel secE7;
	private javax.swing.JLabel secE8;
	private javax.swing.JLabel secF1;
	private javax.swing.JLabel secF2;
	private javax.swing.JLabel secF3;
	private javax.swing.JLabel secF4;
	private javax.swing.JLabel secF5;
	private javax.swing.JLabel secF6;
	private javax.swing.JLabel secF7;
	private javax.swing.JLabel secF8;
	private javax.swing.JLabel secG1;
	private javax.swing.JLabel secG2;
	private javax.swing.JLabel secG3;
	private javax.swing.JLabel secG4;
	private javax.swing.JLabel secG5;
	private javax.swing.JLabel secG6;
	private javax.swing.JLabel secG7;
	private javax.swing.JLabel secG8;
	private javax.swing.JLabel secH1;
	private javax.swing.JLabel secH2;
	private javax.swing.JLabel secH3;
	private javax.swing.JLabel secH4;
	private javax.swing.JLabel secH5;
	private javax.swing.JLabel secH6;
	private javax.swing.JLabel secH7;
	private javax.swing.JLabel secH8;
	private javax.swing.JLabel cavaloJogador0;
	private javax.swing.JLabel cavaloJogador1;
	private javax.swing.JLabel cavaloJogador2;
	private javax.swing.JLabel cavaloJogador3;

	// End of variables declaration//GEN-END:variables

	private void tratarRoque(Jogada jogada, String tipoRoque,
			boolean ehTabuleiroSecundario, String tipoTabuleiro) {
		Casa casaFinal = jogada.getPosicaoFinal();
		ehTabuleiroSecundario = false;
		JLabel[][] tabuleiro = hashTabuleiros.get(tipoTabuleiro);
		if (tipoRoque.equalsIgnoreCase("PEQUENO")) {
			int colunaTorre = (jogada.getPosicaoFinal().getColuna() > 4 && !ehTabuleiroSecundario) ? 7
					: 0;
			int gap = colunaTorre == 0 ? 2 : -2;
			tabuleiro[casaFinal.getLinha()][colunaTorre].setIcon(null);
			tabuleiro[casaFinal.getLinha()][colunaTorre + gap]
					.setIcon(new javax.swing.ImageIcon(getClass().getResource(
							montaStringPeca(casaFinal.getLinha(), colunaTorre
									+ gap, tipoTabuleiro, "Torre"))));
		} else {
			int colunaTorre = (jogada.getPosicaoFinal().getColuna() > 4 && !ehTabuleiroSecundario) ? 7
					: 0;
			int gap = colunaTorre == 0 ? 3 : -3;
			tabuleiro[casaFinal.getLinha()][colunaTorre].setIcon(null);
			tabuleiro[casaFinal.getLinha()][colunaTorre + gap]
					.setIcon(new javax.swing.ImageIcon(getClass().getResource(
							montaStringPeca(casaFinal.getLinha(), colunaTorre
									+ gap, tipoTabuleiro, "Torre"))));
		}
		jogada.setTipoRoque("");
	}

	public void atualizarBP(String mensagem, String nomeJogador) {
		StringBuilder sb = new StringBuilder();
		sb.append(lblTextoBP.getText());
		sb.append(nomeJogador);
		sb.append(": ");
		sb.append(mensagem);
		sb.append("\n");
		this.lblTextoBP.setText(sb.toString());
	}

}
